package com.gxs.tga.examples;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.gxs.tga.examples.domain.Shop;
import com.gxs.tga.examples.service.ShopService;

@Component
public class HelloWorldBean
{
	private String name = "Hardcoded Waqas";
	
	 @Autowired  
     private ShopService shopService; 

	public void setName(String name)
	{
		this.name = name;
	}

	public void printHello()
	{
		System.out.println("Hello ! " + name);
		
		Shop shop = new Shop();
		shop.setId(1);
		shop.setName("Waqas Ahmed");
		shop.setEmplNumber(1234);;
		
		this.shopService.create(shop);
		
		System.out.println("Empployee waqas saved");
	}

}
